import React from "react";
import { EditorMode, IMessageService } from "../types";
import { useInversify } from "../providers/InversifyProvider";

interface MessageBarProps {
    mode: EditorMode;
}

const MessageBar: React.FC<MessageBarProps> = ({ mode }) => {
    const container = useInversify();
    const messageService = container.get<IMessageService>("IMessageService");
    const message = messageService.getMessage(mode);

    return <div className="message-bar">{message}</div>;
};

export default MessageBar;
